<?php
	echo $html->css ( 'tab' );
	echo $html->css ( 'jquery-validate/css/screen' );
	echo $html->css('start/jquery-ui-1.8.2.custom');
	echo $javascript->link('jquery-ui-1.8.2.custom.min');
?>
<script type="text/javascript">

		$(document).ready(function(){
			 $.validator.setDefaults({ 
				 submitHandler: function(form) {
		  
				  form.submit();    
				}       
			});
			 
			// validate signup form on keyup and submit
			$("#f1").validate({
				rules: {
				"data[Channelmanage][linkman]": {
				required: true,formatOfName:true,stringMinLength:0,stringMaxLength:100
				},
				"data[Channelmanage][englishName]": {
						required: false,englishName:true,stringMinLength:0,stringMaxLength:100
					},
				"data[Channelmanage][tel]":{
						required: false,phone:true
					},
				"data[Channelmanage][mobilePhone]":{
						required: false,mobile:true
				},
				"data[Channelmanage][fax]":{
					required: false,fax:true
				},			
				"data[Channelmanage][department]":{
						required: false,stringMaxLength:255
				},
				"data[Channelmanage][email]":{
					required: false,email:true
				}
				},
				messages: {
				},
				//设置验证触发事件 
				focusInvalid: false, 
				onkeyup: false, 
				//设置错误信息提示DOM  
				errorPlacement: function(error, element) { 
				error.appendTo( element.parent()); 
				}
			});	
		});	
	$(function(){
		$(".datepickerSpan :input").datepicker({
			inline: true
		});
		 $('.datepickerSpan :input').datepicker('option', {dateFormat: "yy-mm-dd"});
		 $('.datepickerSpan :input').datepicker( "option", "closeText", 'X' );
		 $("#bir").val("<?php echo $data["Linkman"]["birthday"];?>");
	});
</script>
<script type="text/javascript">
	function mycheck() {
		$("#f1").submit();	
	}
	</script>

<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Channelmanage');//一级目录
										   echo '>';echo __('Channelmanage');//二级目录
										   echo '>';echo __('Linkman');
										   echo '>';?>
									<?php echo $html->tag('span', __('Linkman Edit',true));//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->
<?php echo $form->create('Channelmanage',array('action'=>'editlinkman','type'=> 'post','id'=>"f1"));?>
<div class="tabflex">
<fieldset><legend><?php echo __('Linkman Edit')?></legend>

<table width="100%" cellspacing="0" cellpadding="0" border="0"
	style="text-align: left">
		<tr>
			<td width="50"></td>
			<td width="100"><?php echo __('Linkman Name');//联系人?>:<font color="red">*</font></td>
			<td>
			<?php 
				echo $form->input('linkman',array('label'=>false,'default'=>$data['Linkman']['linkman'],'class' => 'TextBoxH'));	
			?>
			</td>
			<td width="50"></td>
			<td width="100"><?php echo __('linkmenenglishName');//英文名?>:</td>
			<td>
		<?php 
			echo $form->input('englishName',array('label'=>false,'default'=>$data['Linkman']['englishName'],'class' => 'TextBoxH'));	
		?>
		</td>
		</tr>
		
		<tr>
			<td></td>
			<td><?php echo __('birthday');//生日?>:</td>
			<td><!--
		<span class="datepickerSpan">
		<?php 
			echo $form->input('birthday',array('label'=>false,'default'=>$data['Linkman']['birthday'],'id'=>'bir','class' => 'TextBoxH'));
		?>
		</span>
		-->
			<?php 
			echo $form->input('birthday',array('type'=>'date','minYear'=>'1950','dateFormat'=>'YMD','monthNames' => false,'selected'=> $data["Linkman"]["birthday"],'label'=>false));
			?>
			</td>
			<td></td>
			<td><?php echo __('linkmendepartment');//部门?></td>
			<td>
			<?php 
				echo $form->input('department',array('label'=>false,'default'=>$data['Linkman']['department'],'class' => 'TextBoxH'));
			?>
			</td>
		</tr>
		
		<tr>
			<td></td>
			<td><?php echo __('Companylinkposition');//职务?>:</td>
			<td>
			<?php 
				echo $form->input('position',array('label'=>false,'default'=>$data['Linkman']['position'],'class' => 'TextBoxH'));	
			?>
			</td>
			<td></td>
			<td><?php echo __('telephone');//电话?>:<font color="red">*</font></td>
			<td>
			<?php 
				echo $form->input('tel',array('label'=>false,'default'=>$data['Linkman']['tel'],'class' => 'TextBoxH'));
			?>
			</td>
		</tr>
		
		<tr>
			<td></td>
			<td><?php echo __('linkmenmobilePhone');//手机?>:</td>
			<td>
			<?php 
				echo $form->input('mobilePhone',array('label'=>false,'default'=>$data['Linkman']['mobilePhone'],'class' => 'TextBoxH'));
			?>
			</td>
			<td></td>
			<td><?php echo __('Systemconfigs fax');//传真?>:</td>
			<td>
			<?php 
				echo $form->input('fax',array('label'=>false,'default'=>$data['Linkman']['fax'],'class' => 'TextBoxH'));
			?>
			</td>
		</tr>
		<tr>
			<td></td>
			<td><?php echo __('linkmenemail');//电子邮箱?>:</td>
			<td>
			<?php 
				echo $form->input('email',array('label'=>false,'default'=>$data['Linkman']['email'],'class' => 'TextBoxH'));
			?>
			</td>
			<td></td>
			<td><?php echo __('Linkman isKey');//关键?>:</td>
			<td>
			<?php 
				echo $form->input('iskey',array('options'=>array("0"=>"否","1"=>"是"),'label'=>false,'div'=>false,'class'=>'TextBoxE1','default'=>$data['Linkman']['iskey']));
			?>
			</td>
		</tr>
		
		<tr>
			<td></td>
			<td><?php echo __('Companylinkman').__('otherMessage');//联系人备注?>:</td>
			<td  colspan="4">
			<?php 
				echo $form->textarea('memo',array('label'=>false,'class' => 'areaStyle','default'=>$data['Linkman']['memo']));
			?>
			</td>
		</tr>
</table>
</fieldset>

</div>
<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
	<tr>
		<td width="50"></td>
		<td width="100"><?php echo $form->button('返回',array('type'=>'button','class'=>'backsubmit','onclick'=>'history.back(-1)'));?>  <!-- 返回上一级-->
		</td>
		<td width="100"><?php echo $form->button('重置',array('type'=>'reset','class'=>'resetsubmit'));?>  <!-- __('reset', true)取消-->
		</td>
		<td width="100"><?php echo $form->button('确定',array('type'=>'submit','class'=>'oksubmit'));?></td>

	</tr>
</table>
<?php echo $form->hidden('id',array('default'=>$data['Linkman']['id']));?>
<?php echo $form->hidden('delStr',array('name'=>'id','id'=>'delStr'));?>
<?php echo $form->hidden('channelmanage_id',array('default'=>$channelmanageid));?>
<?php echo $form->end();?>
